# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Docs.V1.Model.ParagraphElement do
  @moduledoc """
  A ParagraphElement describes content within a Paragraph.

  ## Attributes

  *   `autoText` (*type:* `GoogleApi.Docs.V1.Model.AutoText.t`, *default:* `nil`) - An auto text paragraph element.
  *   `columnBreak` (*type:* `GoogleApi.Docs.V1.Model.ColumnBreak.t`, *default:* `nil`) - A column break paragraph element.
  *   `endIndex` (*type:* `integer()`, *default:* `nil`) - The zero-base end index of this paragraph element, exclusive, in UTF-16 code units.
  *   `equation` (*type:* `GoogleApi.Docs.V1.Model.Equation.t`, *default:* `nil`) - An equation paragraph element.
  *   `footnoteReference` (*type:* `GoogleApi.Docs.V1.Model.FootnoteReference.t`, *default:* `nil`) - A footnote reference paragraph element.
  *   `horizontalRule` (*type:* `GoogleApi.Docs.V1.Model.HorizontalRule.t`, *default:* `nil`) - A horizontal rule paragraph element.
  *   `inlineObjectElement` (*type:* `GoogleApi.Docs.V1.Model.InlineObjectElement.t`, *default:* `nil`) - An inline object paragraph element.
  *   `pageBreak` (*type:* `GoogleApi.Docs.V1.Model.PageBreak.t`, *default:* `nil`) - A page break paragraph element.
  *   `person` (*type:* `GoogleApi.Docs.V1.Model.Person.t`, *default:* `nil`) - A paragraph element that links to a person or email address.
  *   `richLink` (*type:* `GoogleApi.Docs.V1.Model.RichLink.t`, *default:* `nil`) - A paragraph element that links to a Google resource (such as a file in Google Drive, a YouTube video, or a Calendar event.)
  *   `startIndex` (*type:* `integer()`, *default:* `nil`) - The zero-based start index of this paragraph element, in UTF-16 code units.
  *   `textRun` (*type:* `GoogleApi.Docs.V1.Model.TextRun.t`, *default:* `nil`) - A text run paragraph element.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :autoText => GoogleApi.Docs.V1.Model.AutoText.t() | nil,
          :columnBreak => GoogleApi.Docs.V1.Model.ColumnBreak.t() | nil,
          :endIndex => integer() | nil,
          :equation => GoogleApi.Docs.V1.Model.Equation.t() | nil,
          :footnoteReference => GoogleApi.Docs.V1.Model.FootnoteReference.t() | nil,
          :horizontalRule => GoogleApi.Docs.V1.Model.HorizontalRule.t() | nil,
          :inlineObjectElement => GoogleApi.Docs.V1.Model.InlineObjectElement.t() | nil,
          :pageBreak => GoogleApi.Docs.V1.Model.PageBreak.t() | nil,
          :person => GoogleApi.Docs.V1.Model.Person.t() | nil,
          :richLink => GoogleApi.Docs.V1.Model.RichLink.t() | nil,
          :startIndex => integer() | nil,
          :textRun => GoogleApi.Docs.V1.Model.TextRun.t() | nil
        }

  field(:autoText, as: GoogleApi.Docs.V1.Model.AutoText)
  field(:columnBreak, as: GoogleApi.Docs.V1.Model.ColumnBreak)
  field(:endIndex)
  field(:equation, as: GoogleApi.Docs.V1.Model.Equation)
  field(:footnoteReference, as: GoogleApi.Docs.V1.Model.FootnoteReference)
  field(:horizontalRule, as: GoogleApi.Docs.V1.Model.HorizontalRule)
  field(:inlineObjectElement, as: GoogleApi.Docs.V1.Model.InlineObjectElement)
  field(:pageBreak, as: GoogleApi.Docs.V1.Model.PageBreak)
  field(:person, as: GoogleApi.Docs.V1.Model.Person)
  field(:richLink, as: GoogleApi.Docs.V1.Model.RichLink)
  field(:startIndex)
  field(:textRun, as: GoogleApi.Docs.V1.Model.TextRun)
end

defimpl Poison.Decoder, for: GoogleApi.Docs.V1.Model.ParagraphElement do
  def decode(value, options) do
    GoogleApi.Docs.V1.Model.ParagraphElement.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Docs.V1.Model.ParagraphElement do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
